package router

import (
	"chat/service"
	"github.com/gin-gonic/gin"
	"gorm.io/gorm"
)

func CreateMusicRouter(group *gin.RouterGroup, db *gorm.DB) {
	var music service.UserMusic
	group.POST("/getMusicList", func(context *gin.Context) {
		music.GetMusicList(context, db)
	})
	group.POST("/uploadMusic", func(context *gin.Context) {
		music.UploadMusic(context, db)
	})
	group.POST("/deleteMusic", func(context *gin.Context) {
		music.DeleteMusic(context, db)
	})
	group.POST("/randomMusic", func(context *gin.Context) {
		music.RandomMusic(context, db)
	})
}
